Integrand size = 32, antiderivative size = 243 \[ \int (a+b \cos (c+d x))^3 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx=\frac {1}{8} \left (12 a^2 b B+3 b^3 B+4 a^3 C+9 a b^2 C\right ) x+\frac {\left (15 a^3 b B+60 a b^3 B-3 a^4 C+52 a^2 b^2 C+16 b^4 C\right ) \sin (c+d x)}{30 b d}+\frac {\left (30 a^2 b B+45 b^3 B-6 a^3 C+71 a b^2 C\right ) \cos (c+d x) \sin (c+d x)}{120 d}+\frac {\left (15 a b B-3 a^2 C+16 b^2 C\right ) (a+b \cos (c+d x))^2 \sin (c+d x)}{60 b d}+\frac {(5 b B-a C) (a+b \cos (c+d x))^3 \sin (c+d x)}{20 b d}+\frac {C (a+b \cos (c+d x))^4 \sin (c+d x)}{5 b d} \]
1/8*(12*B*a^2*b+3*B*b^3+4*C*a^3+9*C*a*b^2)*x+1/30*(15*B*a^3*b+60*B*a*b^3-3 *C*a^4+52*C*a^2*b^2+16*C*b^4)*sin(d*x+c)/b/d+1/120*(30*B*a^2*b+45*B*b^3-6* C*a^3+71*C*a*b^2)*cos(d*x+c)*sin(d*x+c)/d+1/60*(15*B*a*b-3*C*a^2+16*C*b^2) *(a+b*cos(d*x+c))^2*sin(d*x+c)/b/d+1/20*(5*B*b-C*a)*(a+b*cos(d*x+c))^3*sin (d*x+c)/b/d+1/5*C*(a+b*cos(d*x+c))^4*sin(d*x+c)/b/d
Time = 3.10 (sec) , antiderivative size = 176, normalized size of antiderivative = 0.72 \[ \int (a+b \cos (c+d x))^3 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx=\frac {60 \left (12 a^2 b B+3 b^3 B+4 a^3 C+9 a b^2 C\right ) (c+d x)+60 \left (8 a^3 B+18 a b^2 B+18 a^2 b C+5 b^3 C\right ) \sin (c+d x)+120 \left (3 a^2 b B+b^3 B+a^3 C+3 a b^2 C\right ) \sin (2 (c+d x))+10 b \left (12 a b B+12 a^2 C+5 b^2 C\right ) \sin (3 (c+d x))+15 b^2 (b B+3 a C) \sin (4 (c+d x))+6 b^3 C \sin (5 (c+d x))}{480 d} \]
(60*(12*a^2*b*B + 3*b^3*B + 4*a^3*C + 9*a*b^2*C)*(c + d*x) + 60*(8*a^3*B + 18*a*b^2*B + 18*a^2*b*C + 5*b^3*C)*Sin[c + d*x] + 120*(3*a^2*b*B + b^3*B + a^3*C + 3*a*b^2*C)*Sin[2*(c + d*x)] + 10*b*(12*a*b*B + 12*a^2*C + 5*b^2* C)*Sin[3*(c + d*x)] + 15*b^2*(b*B + 3*a*C)*Sin[4*(c + d*x)] + 6*b^3*C*Sin[ 5*(c + d*x)])/(480*d)
Time = 0.79 (sec) , antiderivative size = 252, normalized size of antiderivative = 1.04, number of steps used = 8, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3042, 3502, 3042, 3232, 3042, 3232, 3042, 3213}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (a+b \cos (c+d x))^3 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right )^3 \left (B \sin \left (c+d x+\frac {\pi }{2}\right )+C \sin \left (c+d x+\frac {\pi }{2}\right )^2\right )dx\) |
\(\Big \downarrow \) 3502 |
\(\displaystyle \frac {\int (a+b \cos (c+d x))^3 (4 b C+(5 b B-a C) \cos (c+d x))dx}{5 b}+\frac {C \sin (c+d x) (a+b \cos (c+d x))^4}{5 b d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right )^3 \left (4 b C+(5 b B-a C) \sin \left (c+d x+\frac {\pi }{2}\right )\right )dx}{5 b}+\frac {C \sin (c+d x) (a+b \cos (c+d x))^4}{5 b d}\) |
\(\Big \downarrow \) 3232 |
\(\displaystyle \frac {\frac {1}{4} \int (a+b \cos (c+d x))^2 \left (b (15 b B+13 a C)+\left (-3 C a^2+15 b B a+16 b^2 C\right ) \cos (c+d x)\right )dx+\frac {(5 b B-a C) \sin (c+d x) (a+b \cos (c+d x))^3}{4 d}}{5 b}+\frac {C \sin (c+d x) (a+b \cos (c+d x))^4}{5 b d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {1}{4} \int \left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right )^2 \left (b (15 b B+13 a C)+\left (-3 C a^2+15 b B a+16 b^2 C\right ) \sin \left (c+d x+\frac {\pi }{2}\right )\right )dx+\frac {(5 b B-a C) \sin (c+d x) (a+b \cos (c+d x))^3}{4 d}}{5 b}+\frac {C \sin (c+d x) (a+b \cos (c+d x))^4}{5 b d}\) |
\(\Big \downarrow \) 3232 |
\(\displaystyle \frac {\frac {1}{4} \left (\frac {1}{3} \int (a+b \cos (c+d x)) \left (b \left (33 C a^2+75 b B a+32 b^2 C\right )+\left (-6 C a^3+30 b B a^2+71 b^2 C a+45 b^3 B\right ) \cos (c+d x)\right )dx+\frac {\left (-3 a^2 C+15 a b B+16 b^2 C\right ) \sin (c+d x) (a+b \cos (c+d x))^2}{3 d}\right )+\frac {(5 b B-a C) \sin (c+d x) (a+b \cos (c+d x))^3}{4 d}}{5 b}+\frac {C \sin (c+d x) (a+b \cos (c+d x))^4}{5 b d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {1}{4} \left (\frac {1}{3} \int \left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right ) \left (b \left (33 C a^2+75 b B a+32 b^2 C\right )+\left (-6 C a^3+30 b B a^2+71 b^2 C a+45 b^3 B\right ) \sin \left (c+d x+\frac {\pi }{2}\right )\right )dx+\frac {\left (-3 a^2 C+15 a b B+16 b^2 C\right ) \sin (c+d x) (a+b \cos (c+d x))^2}{3 d}\right )+\frac {(5 b B-a C) \sin (c+d x) (a+b \cos (c+d x))^3}{4 d}}{5 b}+\frac {C \sin (c+d x) (a+b \cos (c+d x))^4}{5 b d}\) |
\(\Big \downarrow \) 3213 |
\(\displaystyle \frac {\frac {1}{4} \left (\frac {\left (-3 a^2 C+15 a b B+16 b^2 C\right ) \sin (c+d x) (a+b \cos (c+d x))^2}{3 d}+\frac {1}{3} \left (\frac {b \left (-6 a^3 C+30 a^2 b B+71 a b^2 C+45 b^3 B\right ) \sin (c+d x) \cos (c+d x)}{2 d}+\frac {15}{2} b x \left (4 a^3 C+12 a^2 b B+9 a b^2 C+3 b^3 B\right )+\frac {2 \left (-3 a^4 C+15 a^3 b B+52 a^2 b^2 C+60 a b^3 B+16 b^4 C\right ) \sin (c+d x)}{d}\right )\right )+\frac {(5 b B-a C) \sin (c+d x) (a+b \cos (c+d x))^3}{4 d}}{5 b}+\frac {C \sin (c+d x) (a+b \cos (c+d x))^4}{5 b d}\) |
(C*(a + b*Cos[c + d*x])^4*Sin[c + d*x])/(5*b*d) + (((5*b*B - a*C)*(a + b*C os[c + d*x])^3*Sin[c + d*x])/(4*d) + (((15*a*b*B - 3*a^2*C + 16*b^2*C)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(3*d) + ((15*b*(12*a^2*b*B + 3*b^3*B + 4 *a^3*C + 9*a*b^2*C)*x)/2 + (2*(15*a^3*b*B + 60*a*b^3*B - 3*a^4*C + 52*a^2* b^2*C + 16*b^4*C)*Sin[c + d*x])/d + (b*(30*a^2*b*B + 45*b^3*B - 6*a^3*C + 71*a*b^2*C)*Cos[c + d*x]*Sin[c + d*x])/(2*d))/3)/4)/(5*b)
3.8.86.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.) *(x_)]), x_Symbol] :> Simp[(2*a*c + b*d)*(x/2), x] + (-Simp[(b*c + a*d)*(Co s[e + f*x]/f), x] - Simp[b*d*Cos[e + f*x]*(Sin[e + f*x]/(2*f)), x]) /; Free Q[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-d)*Cos[e + f*x]*((a + b*Sin[e + f*x])^m/( f*(m + 1))), x] + Simp[1/(m + 1) Int[(a + b*Sin[e + f*x])^(m - 1)*Simp[b* d*m + a*c*(m + 1) + (a*d*m + b*c*(m + 1))*Sin[e + f*x], x], x], x] /; FreeQ [{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && GtQ[m, 0] && IntegerQ[2*m]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-C)*Co s[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(m + 2))), x] + Simp[1/(b*(m + 2)) Int[(a + b*Sin[e + f*x])^m*Simp[A*b*(m + 2) + b*C*(m + 1) + (b*B*(m + 2) - a*C)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] && !LtQ[m, -1]
Time = 1.08 (sec) , antiderivative size = 176, normalized size of antiderivative = 0.72
method | result | size |
parts | \(\frac {\left (B \,b^{3}+3 C a \,b^{2}\right ) \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )}{d}+\frac {\left (3 B a \,b^{2}+3 C \,a^{2} b \right ) \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3 d}+\frac {\left (3 B \,a^{2} b +C \,a^{3}\right ) \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {C \,b^{3} \left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{5 d}+\frac {a^{3} B \sin \left (d x +c \right )}{d}\) | \(176\) |
parallelrisch | \(\frac {120 \left (3 B \,a^{2} b +B \,b^{3}+C \,a^{3}+3 C a \,b^{2}\right ) \sin \left (2 d x +2 c \right )+10 \left (12 B a \,b^{2}+12 C \,a^{2} b +5 C \,b^{3}\right ) \sin \left (3 d x +3 c \right )+15 \left (B \,b^{3}+3 C a \,b^{2}\right ) \sin \left (4 d x +4 c \right )+6 C \,b^{3} \sin \left (5 d x +5 c \right )+60 \left (8 B \,a^{3}+18 B a \,b^{2}+18 C \,a^{2} b +5 C \,b^{3}\right ) \sin \left (d x +c \right )+720 x \left (B \,a^{2} b +\frac {1}{4} B \,b^{3}+\frac {1}{3} C \,a^{3}+\frac {3}{4} C a \,b^{2}\right ) d}{480 d}\) | \(179\) |
derivativedivides | \(\frac {\frac {C \,b^{3} \left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{5}+B \,b^{3} \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+3 C a \,b^{2} \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+B a \,b^{2} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )+C \,a^{2} b \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )+3 B \,a^{2} b \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+C \,a^{3} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+B \sin \left (d x +c \right ) a^{3}}{d}\) | \(227\) |
default | \(\frac {\frac {C \,b^{3} \left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{5}+B \,b^{3} \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+3 C a \,b^{2} \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+B a \,b^{2} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )+C \,a^{2} b \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )+3 B \,a^{2} b \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+C \,a^{3} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+B \sin \left (d x +c \right ) a^{3}}{d}\) | \(227\) |
risch | \(\frac {3 x B \,a^{2} b}{2}+\frac {3 b^{3} B x}{8}+\frac {a^{3} C x}{2}+\frac {9 a \,b^{2} C x}{8}+\frac {a^{3} B \sin \left (d x +c \right )}{d}+\frac {9 \sin \left (d x +c \right ) B a \,b^{2}}{4 d}+\frac {9 \sin \left (d x +c \right ) C \,a^{2} b}{4 d}+\frac {5 \sin \left (d x +c \right ) C \,b^{3}}{8 d}+\frac {C \,b^{3} \sin \left (5 d x +5 c \right )}{80 d}+\frac {\sin \left (4 d x +4 c \right ) B \,b^{3}}{32 d}+\frac {3 \sin \left (4 d x +4 c \right ) C a \,b^{2}}{32 d}+\frac {\sin \left (3 d x +3 c \right ) B a \,b^{2}}{4 d}+\frac {\sin \left (3 d x +3 c \right ) C \,a^{2} b}{4 d}+\frac {5 \sin \left (3 d x +3 c \right ) C \,b^{3}}{48 d}+\frac {3 \sin \left (2 d x +2 c \right ) B \,a^{2} b}{4 d}+\frac {\sin \left (2 d x +2 c \right ) B \,b^{3}}{4 d}+\frac {\sin \left (2 d x +2 c \right ) C \,a^{3}}{4 d}+\frac {3 \sin \left (2 d x +2 c \right ) C a \,b^{2}}{4 d}\) | \(278\) |
norman | \(\frac {\left (\frac {3}{2} B \,a^{2} b +\frac {3}{8} B \,b^{3}+\frac {1}{2} C \,a^{3}+\frac {9}{8} C a \,b^{2}\right ) x +\left (15 B \,a^{2} b +\frac {15}{4} B \,b^{3}+5 C \,a^{3}+\frac {45}{4} C a \,b^{2}\right ) x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (15 B \,a^{2} b +\frac {15}{4} B \,b^{3}+5 C \,a^{3}+\frac {45}{4} C a \,b^{2}\right ) x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (\frac {3}{2} B \,a^{2} b +\frac {3}{8} B \,b^{3}+\frac {1}{2} C \,a^{3}+\frac {9}{8} C a \,b^{2}\right ) x \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (\frac {15}{2} B \,a^{2} b +\frac {15}{8} B \,b^{3}+\frac {5}{2} C \,a^{3}+\frac {45}{8} C a \,b^{2}\right ) x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (\frac {15}{2} B \,a^{2} b +\frac {15}{8} B \,b^{3}+\frac {5}{2} C \,a^{3}+\frac {45}{8} C a \,b^{2}\right ) x \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {4 \left (45 B \,a^{3}+75 B a \,b^{2}+75 C \,a^{2} b +29 C \,b^{3}\right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{15 d}+\frac {\left (8 B \,a^{3}-12 B \,a^{2} b +24 B a \,b^{2}-5 B \,b^{3}-4 C \,a^{3}+24 C \,a^{2} b -15 C a \,b^{2}+8 C \,b^{3}\right ) \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}+\frac {\left (8 B \,a^{3}+12 B \,a^{2} b +24 B a \,b^{2}+5 B \,b^{3}+4 C \,a^{3}+24 C \,a^{2} b +15 C a \,b^{2}+8 C \,b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}+\frac {\left (48 B \,a^{3}-36 B \,a^{2} b +96 B a \,b^{2}-3 B \,b^{3}-12 C \,a^{3}+96 C \,a^{2} b -9 C a \,b^{2}+16 C \,b^{3}\right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 d}+\frac {\left (48 B \,a^{3}+36 B \,a^{2} b +96 B a \,b^{2}+3 B \,b^{3}+12 C \,a^{3}+96 C \,a^{2} b +9 C a \,b^{2}+16 C \,b^{3}\right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{5}}\) | \(564\) |
(B*b^3+3*C*a*b^2)/d*(1/4*(cos(d*x+c)^3+3/2*cos(d*x+c))*sin(d*x+c)+3/8*d*x+ 3/8*c)+1/3*(3*B*a*b^2+3*C*a^2*b)/d*(2+cos(d*x+c)^2)*sin(d*x+c)+(3*B*a^2*b+ C*a^3)/d*(1/2*cos(d*x+c)*sin(d*x+c)+1/2*d*x+1/2*c)+1/5*C*b^3/d*(8/3+cos(d* x+c)^4+4/3*cos(d*x+c)^2)*sin(d*x+c)+a^3*B*sin(d*x+c)/d
Time = 0.28 (sec) , antiderivative size = 174, normalized size of antiderivative = 0.72 \[ \int (a+b \cos (c+d x))^3 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx=\frac {15 \, {\left (4 \, C a^{3} + 12 \, B a^{2} b + 9 \, C a b^{2} + 3 \, B b^{3}\right )} d x + {\left (24 \, C b^{3} \cos \left (d x + c\right )^{4} + 120 \, B a^{3} + 240 \, C a^{2} b + 240 \, B a b^{2} + 64 \, C b^{3} + 30 \, {\left (3 \, C a b^{2} + B b^{3}\right )} \cos \left (d x + c\right )^{3} + 8 \, {\left (15 \, C a^{2} b + 15 \, B a b^{2} + 4 \, C b^{3}\right )} \cos \left (d x + c\right )^{2} + 15 \, {\left (4 \, C a^{3} + 12 \, B a^{2} b + 9 \, C a b^{2} + 3 \, B b^{3}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{120 \, d} \]
1/120*(15*(4*C*a^3 + 12*B*a^2*b + 9*C*a*b^2 + 3*B*b^3)*d*x + (24*C*b^3*cos (d*x + c)^4 + 120*B*a^3 + 240*C*a^2*b + 240*B*a*b^2 + 64*C*b^3 + 30*(3*C*a *b^2 + B*b^3)*cos(d*x + c)^3 + 8*(15*C*a^2*b + 15*B*a*b^2 + 4*C*b^3)*cos(d *x + c)^2 + 15*(4*C*a^3 + 12*B*a^2*b + 9*C*a*b^2 + 3*B*b^3)*cos(d*x + c))* sin(d*x + c))/d
Leaf count of result is larger than twice the leaf count of optimal. 552 vs. \(2 (241) = 482\).
Time = 0.30 (sec) , antiderivative size = 552, normalized size of antiderivative = 2.27 \[ \int (a+b \cos (c+d x))^3 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx=\begin {cases} \frac {B a^{3} \sin {\left (c + d x \right )}}{d} + \frac {3 B a^{2} b x \sin ^{2}{\left (c + d x \right )}}{2} + \frac {3 B a^{2} b x \cos ^{2}{\left (c + d x \right )}}{2} + \frac {3 B a^{2} b \sin {\left (c + d x \right )} \cos {\left (c + d x \right )}}{2 d} + \frac {2 B a b^{2} \sin ^{3}{\left (c + d x \right )}}{d} + \frac {3 B a b^{2} \sin {\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{d} + \frac {3 B b^{3} x \sin ^{4}{\left (c + d x \right )}}{8} + \frac {3 B b^{3} x \sin ^{2}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{4} + \frac {3 B b^{3} x \cos ^{4}{\left (c + d x \right )}}{8} + \frac {3 B b^{3} \sin ^{3}{\left (c + d x \right )} \cos {\left (c + d x \right )}}{8 d} + \frac {5 B b^{3} \sin {\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{8 d} + \frac {C a^{3} x \sin ^{2}{\left (c + d x \right )}}{2} + \frac {C a^{3} x \cos ^{2}{\left (c + d x \right )}}{2} + \frac {C a^{3} \sin {\left (c + d x \right )} \cos {\left (c + d x \right )}}{2 d} + \frac {2 C a^{2} b \sin ^{3}{\left (c + d x \right )}}{d} + \frac {3 C a^{2} b \sin {\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{d} + \frac {9 C a b^{2} x \sin ^{4}{\left (c + d x \right )}}{8} + \frac {9 C a b^{2} x \sin ^{2}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{4} + \frac {9 C a b^{2} x \cos ^{4}{\left (c + d x \right )}}{8} + \frac {9 C a b^{2} \sin ^{3}{\left (c + d x \right )} \cos {\left (c + d x \right )}}{8 d} + \frac {15 C a b^{2} \sin {\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{8 d} + \frac {8 C b^{3} \sin ^{5}{\left (c + d x \right )}}{15 d} + \frac {4 C b^{3} \sin ^{3}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{3 d} + \frac {C b^{3} \sin {\left (c + d x \right )} \cos ^{4}{\left (c + d x \right )}}{d} & \text {for}\: d \neq 0 \\x \left (a + b \cos {\left (c \right )}\right )^{3} \left (B \cos {\left (c \right )} + C \cos ^{2}{\left (c \right )}\right ) & \text {otherwise} \end {cases} \]
Piecewise((B*a**3*sin(c + d*x)/d + 3*B*a**2*b*x*sin(c + d*x)**2/2 + 3*B*a* *2*b*x*cos(c + d*x)**2/2 + 3*B*a**2*b*sin(c + d*x)*cos(c + d*x)/(2*d) + 2* B*a*b**2*sin(c + d*x)**3/d + 3*B*a*b**2*sin(c + d*x)*cos(c + d*x)**2/d + 3 *B*b**3*x*sin(c + d*x)**4/8 + 3*B*b**3*x*sin(c + d*x)**2*cos(c + d*x)**2/4 + 3*B*b**3*x*cos(c + d*x)**4/8 + 3*B*b**3*sin(c + d*x)**3*cos(c + d*x)/(8 *d) + 5*B*b**3*sin(c + d*x)*cos(c + d*x)**3/(8*d) + C*a**3*x*sin(c + d*x)* *2/2 + C*a**3*x*cos(c + d*x)**2/2 + C*a**3*sin(c + d*x)*cos(c + d*x)/(2*d) + 2*C*a**2*b*sin(c + d*x)**3/d + 3*C*a**2*b*sin(c + d*x)*cos(c + d*x)**2/ d + 9*C*a*b**2*x*sin(c + d*x)**4/8 + 9*C*a*b**2*x*sin(c + d*x)**2*cos(c + d*x)**2/4 + 9*C*a*b**2*x*cos(c + d*x)**4/8 + 9*C*a*b**2*sin(c + d*x)**3*co s(c + d*x)/(8*d) + 15*C*a*b**2*sin(c + d*x)*cos(c + d*x)**3/(8*d) + 8*C*b* *3*sin(c + d*x)**5/(15*d) + 4*C*b**3*sin(c + d*x)**3*cos(c + d*x)**2/(3*d) + C*b**3*sin(c + d*x)*cos(c + d*x)**4/d, Ne(d, 0)), (x*(a + b*cos(c))**3* (B*cos(c) + C*cos(c)**2), True))
Time = 0.23 (sec) , antiderivative size = 217, normalized size of antiderivative = 0.89 \[ \int (a+b \cos (c+d x))^3 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx=\frac {120 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} C a^{3} + 360 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} B a^{2} b - 480 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} C a^{2} b - 480 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} B a b^{2} + 45 \, {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} C a b^{2} + 15 \, {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} B b^{3} + 32 \, {\left (3 \, \sin \left (d x + c\right )^{5} - 10 \, \sin \left (d x + c\right )^{3} + 15 \, \sin \left (d x + c\right )\right )} C b^{3} + 480 \, B a^{3} \sin \left (d x + c\right )}{480 \, d} \]
1/480*(120*(2*d*x + 2*c + sin(2*d*x + 2*c))*C*a^3 + 360*(2*d*x + 2*c + sin (2*d*x + 2*c))*B*a^2*b - 480*(sin(d*x + c)^3 - 3*sin(d*x + c))*C*a^2*b - 4 80*(sin(d*x + c)^3 - 3*sin(d*x + c))*B*a*b^2 + 45*(12*d*x + 12*c + sin(4*d *x + 4*c) + 8*sin(2*d*x + 2*c))*C*a*b^2 + 15*(12*d*x + 12*c + sin(4*d*x + 4*c) + 8*sin(2*d*x + 2*c))*B*b^3 + 32*(3*sin(d*x + c)^5 - 10*sin(d*x + c)^ 3 + 15*sin(d*x + c))*C*b^3 + 480*B*a^3*sin(d*x + c))/d
Time = 0.32 (sec) , antiderivative size = 188, normalized size of antiderivative = 0.77 \[ \int (a+b \cos (c+d x))^3 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx=\frac {C b^{3} \sin \left (5 \, d x + 5 \, c\right )}{80 \, d} + \frac {1}{8} \, {\left (4 \, C a^{3} + 12 \, B a^{2} b + 9 \, C a b^{2} + 3 \, B b^{3}\right )} x + \frac {{\left (3 \, C a b^{2} + B b^{3}\right )} \sin \left (4 \, d x + 4 \, c\right )}{32 \, d} + \frac {{\left (12 \, C a^{2} b + 12 \, B a b^{2} + 5 \, C b^{3}\right )} \sin \left (3 \, d x + 3 \, c\right )}{48 \, d} + \frac {{\left (C a^{3} + 3 \, B a^{2} b + 3 \, C a b^{2} + B b^{3}\right )} \sin \left (2 \, d x + 2 \, c\right )}{4 \, d} + \frac {{\left (8 \, B a^{3} + 18 \, C a^{2} b + 18 \, B a b^{2} + 5 \, C b^{3}\right )} \sin \left (d x + c\right )}{8 \, d} \]
1/80*C*b^3*sin(5*d*x + 5*c)/d + 1/8*(4*C*a^3 + 12*B*a^2*b + 9*C*a*b^2 + 3* B*b^3)*x + 1/32*(3*C*a*b^2 + B*b^3)*sin(4*d*x + 4*c)/d + 1/48*(12*C*a^2*b + 12*B*a*b^2 + 5*C*b^3)*sin(3*d*x + 3*c)/d + 1/4*(C*a^3 + 3*B*a^2*b + 3*C* a*b^2 + B*b^3)*sin(2*d*x + 2*c)/d + 1/8*(8*B*a^3 + 18*C*a^2*b + 18*B*a*b^2 + 5*C*b^3)*sin(d*x + c)/d
Time = 2.16 (sec) , antiderivative size = 277, normalized size of antiderivative = 1.14 \[ \int (a+b \cos (c+d x))^3 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx=\frac {3\,B\,b^3\,x}{8}+\frac {C\,a^3\,x}{2}+\frac {3\,B\,a^2\,b\,x}{2}+\frac {9\,C\,a\,b^2\,x}{8}+\frac {B\,a^3\,\sin \left (c+d\,x\right )}{d}+\frac {5\,C\,b^3\,\sin \left (c+d\,x\right )}{8\,d}+\frac {B\,b^3\,\sin \left (2\,c+2\,d\,x\right )}{4\,d}+\frac {C\,a^3\,\sin \left (2\,c+2\,d\,x\right )}{4\,d}+\frac {B\,b^3\,\sin \left (4\,c+4\,d\,x\right )}{32\,d}+\frac {5\,C\,b^3\,\sin \left (3\,c+3\,d\,x\right )}{48\,d}+\frac {C\,b^3\,\sin \left (5\,c+5\,d\,x\right )}{80\,d}+\frac {3\,B\,a^2\,b\,\sin \left (2\,c+2\,d\,x\right )}{4\,d}+\frac {B\,a\,b^2\,\sin \left (3\,c+3\,d\,x\right )}{4\,d}+\frac {3\,C\,a\,b^2\,\sin \left (2\,c+2\,d\,x\right )}{4\,d}+\frac {C\,a^2\,b\,\sin \left (3\,c+3\,d\,x\right )}{4\,d}+\frac {3\,C\,a\,b^2\,\sin \left (4\,c+4\,d\,x\right )}{32\,d}+\frac {9\,B\,a\,b^2\,\sin \left (c+d\,x\right )}{4\,d}+\frac {9\,C\,a^2\,b\,\sin \left (c+d\,x\right )}{4\,d} \]
(3*B*b^3*x)/8 + (C*a^3*x)/2 + (3*B*a^2*b*x)/2 + (9*C*a*b^2*x)/8 + (B*a^3*s in(c + d*x))/d + (5*C*b^3*sin(c + d*x))/(8*d) + (B*b^3*sin(2*c + 2*d*x))/( 4*d) + (C*a^3*sin(2*c + 2*d*x))/(4*d) + (B*b^3*sin(4*c + 4*d*x))/(32*d) + (5*C*b^3*sin(3*c + 3*d*x))/(48*d) + (C*b^3*sin(5*c + 5*d*x))/(80*d) + (3*B *a^2*b*sin(2*c + 2*d*x))/(4*d) + (B*a*b^2*sin(3*c + 3*d*x))/(4*d) + (3*C*a *b^2*sin(2*c + 2*d*x))/(4*d) + (C*a^2*b*sin(3*c + 3*d*x))/(4*d) + (3*C*a*b ^2*sin(4*c + 4*d*x))/(32*d) + (9*B*a*b^2*sin(c + d*x))/(4*d) + (9*C*a^2*b* sin(c + d*x))/(4*d)